package org.mtmi.ui.drawables;

import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;

/**
 * Common interface for pixel image and "painted" image (or vectorial ones in future ?)
 */
public interface IDrawable 
{
	/** state used to pain drawable: normal state, release for a button */
	public static final int NORMAL=0;
	/** state used to pain drawable: selected in a list view */
	public static final int SELECTED=1;
	/** state used to pain drawable: item is disable */
	public static final int DISABLED=2;
	/** state used to pain drawable: item is pressed */
	public static final int PRESSED=3;
	
	/** @return the preferred size of drawable, may be computed from given size (migth be 0,0) */
	public Point computeSize( int width, int height );
	
	/** Paint the drawable on GC at given location and size */
	public void paint( GC gc, int x, int y, int width, int height, int state );
	
}

